<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--商户管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/member/css/core1.css?v=3"/>

    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="__STATIC_URL__/static/layer/layer.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>


</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ul class="breadcrumb">
                <li>
                    当前位置是&nbsp;:
                </li>
                <li><a href="javascript:history.back();">营销工具</a></li>
                <li><a href="javascript:history.back();">活动营销</a></li>
                <li class="active" style="color: #02b87f;">卡券群发</li>
            </ul>
        </div>
        <div class="panel mgr15 mgl15">
            <div class="panel-heading addCharts" style="background:#ededed;">
                创建卡券群发
            </div>
            <div class="panel-body">
                <div class="panel panel-default" id="step1">
                    <div class="panel-body">
                        <div class="pull-left alert form form-area" style="width:100%; position: relative; display: block; margin-top: 0.5px;" id="form1">
                            <div class="arrow_in"></div>
                            <!--<h4  class="card_title_detail">基本信息：</h4>-->
                            <div class="alert alert-danger" role="alert">
                                认证服务号可使用该功能需，且会占用每月4次的群发限额。
                            </div>
                            <form class="form-horizontal adminex-form" action="" id="senform" method="post">
                                <input type="hidden" name="type" id="can_type" value="1">
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 活动名称</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <input type="hidden" name="type"  value="1">
                                        <input type="text" class="form-control" name="rulename">
                                        <div class="help-block">活动名称只用于管理，不显示给用户。 </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 选择要投放的卡券</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <select name="card_id" class="form-control" >
                                            <option value="">请选择</option>
                                            {volist name="cardus" id="vous"}
                                                <option value="{$vous.card_id}">{$vous.title}[会员卡]</option>
                                            {/volist}
                                            {volist name="cards" id="vos"}
                                            <option value="{$vos.card_id}">{$vos.title}[卡券]</option>
                                            {/volist}
                                        </select>
                                    </div>
                                </div>
                                <div style="text-align: center">
                                    <button type="button" id="send" class="btn btn-primary">发送</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
      {include file='public/footer'/}
    </div>
</section>
</body>
<script>
    $(function () {
        $("#send").click(function () {
            layer.confirm('每月共四次机会,是否确认发送？', {
                btn: ['确认', '取消'] //按钮
            }, function () {
                $("#senform").submit()
            }, function () {
                layer.msg('您已取消!', {
                    time: 500, //20s后自动关闭
                });
            });

        });
        $("#share").on('switch-change', function (e, data) {
            var $el = $(data.el), value = data.value;
            if(value==true){
                $("#can_share").val(1);
            }else{
                $("#can_share").val(0);
            }
        });
        $("#give").on('switch-change', function (e, data) {
            var $el = $(data.el), value = data.value;
            if(value==true){
                $("#can_give_friend").val(1);
            }else{
                $("#can_give_friend").val(0);
            }
        });
    });

</script>
</html>
